package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.agentLog;
import com.ymttest.database.model.godmch.agentLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface agentLogMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentlog
     *
     * @mbggenerated Wed Mar 11 14:57:42 CST 2020
     */
    @SelectProvider(type=agentLogSqlProvider.class, method="countByExample")
    int countByExample(agentLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentlog
     *
     * @mbggenerated Wed Mar 11 14:57:42 CST 2020
     */
    @DeleteProvider(type=agentLogSqlProvider.class, method="deleteByExample")
    int deleteByExample(agentLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentlog
     *
     * @mbggenerated Wed Mar 11 14:57:42 CST 2020
     */
    @Delete({
        "delete from agentlog",
        "where logId = #{logId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer logId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentlog
     *
     * @mbggenerated Wed Mar 11 14:57:42 CST 2020
     */
    @Insert({
        "insert into agentlog (logId, agentId, ",
        "mchId, logType, ",
        "remark, createTime)",
        "values (#{logId,jdbcType=INTEGER}, #{agentId,jdbcType=INTEGER}, ",
        "#{mchId,jdbcType=INTEGER}, #{logType,jdbcType=INTEGER}, ",
        "#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})"
    })
    int insert(agentLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentlog
     *
     * @mbggenerated Wed Mar 11 14:57:42 CST 2020
     */
    @InsertProvider(type=agentLogSqlProvider.class, method="insertSelective")
    int insertSelective(agentLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentlog
     *
     * @mbggenerated Wed Mar 11 14:57:42 CST 2020
     */
    @SelectProvider(type=agentLogSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="logId", property="logId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="agentId", property="agentId", jdbcType=JdbcType.INTEGER),
        @Result(column="mchId", property="mchId", jdbcType=JdbcType.INTEGER),
        @Result(column="logType", property="logType", jdbcType=JdbcType.INTEGER),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<agentLog> selectByExample(agentLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentlog
     *
     * @mbggenerated Wed Mar 11 14:57:42 CST 2020
     */
    @Select({
        "select",
        "logId, agentId, mchId, logType, remark, createTime",
        "from agentlog",
        "where logId = #{logId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="logId", property="logId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="agentId", property="agentId", jdbcType=JdbcType.INTEGER),
        @Result(column="mchId", property="mchId", jdbcType=JdbcType.INTEGER),
        @Result(column="logType", property="logType", jdbcType=JdbcType.INTEGER),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP)
    })
    agentLog selectByPrimaryKey(Integer logId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentlog
     *
     * @mbggenerated Wed Mar 11 14:57:42 CST 2020
     */
    @UpdateProvider(type=agentLogSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") agentLog record, @Param("example") agentLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentlog
     *
     * @mbggenerated Wed Mar 11 14:57:42 CST 2020
     */
    @UpdateProvider(type=agentLogSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") agentLog record, @Param("example") agentLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentlog
     *
     * @mbggenerated Wed Mar 11 14:57:42 CST 2020
     */
    @UpdateProvider(type=agentLogSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(agentLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentlog
     *
     * @mbggenerated Wed Mar 11 14:57:42 CST 2020
     */
    @Update({
        "update agentlog",
        "set agentId = #{agentId,jdbcType=INTEGER},",
          "mchId = #{mchId,jdbcType=INTEGER},",
          "logType = #{logType,jdbcType=INTEGER},",
          "remark = #{remark,jdbcType=VARCHAR},",
          "createTime = #{createTime,jdbcType=TIMESTAMP}",
        "where logId = #{logId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(agentLog record);
}